package ArrayList;

import java.util.ArrayList;

public class ArrayListDemo {
    public static void main(String[] args) {
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("A");
        arrayList.add("B");
        arrayList.add("C");
        arrayList.add(1,"K");
        System.out.println(arrayList);
        for(int i = 0; i<arrayList.size();i++){
            System.out.print(arrayList.get(i));
        }
        System.out.println();
        for(String s : arrayList){
            System.out.print(s);
        }

    }
}
